package com.lsh.oms.core.records.core;

import java.util.List;
import java.util.Map;
import java.util.Optional;

public interface ReturnRequest {

    Long id();

    String number();

    Status status();

    void start(Map<String, Object> request);

    void check(Map<String, Object> request);

    Optional<ReturnRequestDetail> detail(Long id);

    Map<String, List<Map<String, Object>>> relations();

    void refundNotify(Map<String, Object> request);

    enum Occasion {
        // 现场
        BEFORE_SIGN,
        // 售后
        AFTER_SIGN
    }

    enum Status {
        // 待审核
        PENDING,
        // 已审核
        CHECKED
    }

    interface ReturnRequestDetail {

        Long id();

        void update(Map<String, Object> request);
    }
}
